<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="thx" uri="/thx-tags"%>

<form id="role-form" name="ui-adminlte-form" data-toggle="validator"
	role="form" method="post"
	action="${pageContext.request.contextPath}/user/role!save.action"
	forward-action="${pageContext.request.contextPath}/user/role!list.action">
	<s:token></s:token>
	<input name="id" value="${entity.roleId }" type="hidden" />
	<div class="form-group">
		<label>角色名称</label> <input type="text" name="entity.roleName"
			value="${entity.roleName}" class="form-control required"
			remote="${pageContext.request.contextPath}/user/role!checkRoleName.action?id=${entity.roleId}"
			placeholder="输入角色名" />
	</div>
	<div class="form-group">
		<label>角色代码 </label> <input type="text" name="entity.roleCode"
			value="${entity.roleCode}" class="form-control required"
			placeholder="输入角色代码" />
	</div>
	<div class="form-group">
		<label>角色描述</label> <input type="text" name="entity.description"
			value="${entity.description}" class="form-control required"
			placeholder="输入角色描述" />
	</div>
</form>

<script>
	$(function() {
		form.init();
	});
</script>